import java.awt.Color;
import java.awt.Dimension;
import java.util.ArrayList;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

public class Hand extends JPanel {
	ArrayList<Card> handCards;
	public Hand() {
		handCards = new ArrayList<Card>();
		setPreferredSize(new Dimension(100,100));
		setBackground(Color.GREEN);
	}
	public void addCard(Card newCard) {
		handCards.add(newCard);
		add(newCard);
		this.validate();
	}
	
	public Card getCardAt(int pI){
		return (Card)this.getComponent(pI);
	}
	
	public void removeCard(Card name) {
		handCards.remove(name);
		this.remove(name);
		this.validate();
	}
}
